const url = location.href
const isPro = url.indexOf('favormylikes') !== -1
// const isPro = true
const isTest = url.indexOf('119.78.67.12') !== -1
let requestUrl = isPro
  ? url.split(':')[0] + '://api.favormylikes.com/spring/api'
  : url.split(':')[0] + '://localhost:8888/api'

const testUrl = 'http://www.tmallab.com/tmallab_test/'
requestUrl = isTest ? testUrl : requestUrl
const config = {
  // baseURL: isPro
  //   ? 'https://tmallab.com/tmallab/'
  //   // : 'http://localhost:8081'
  //   // : 'https://tmallab.com/tmallab/'
  //   : url.split(':')[0] + '://localhost:8081'
  baseURL: requestUrl
}
export default config
